// string_array.h
#ifndef STRING_ARRAY_H
#define STRING_ARRAY_H

class myStr {
private:
    char* data;
    int length;
    int* next;
    int* nextVal;

public:
    myStr(const char* s);
    ~myStr();
    void print() const;
    bool replaceStr(myStr& S, const int& start, const myStr& T, const myStr& V);
    int simpleMatch(const myStr& S, const myStr& T);
    int kmpMatch(const myStr& S, const myStr& T);
    void kmp_next();
    void kmp_nextVal();
    void printNext() const;
    void printNextVal() const;
};

class myMatrix {
private:
    struct matrixNode {
        int row;
        int col;
        int value;
    };
    matrixNode* nodeList;
    int rowNum;
    int colNum;
    int nodeNum;

public:
    myMatrix(const int& rNum, const int& cNum, const int& nNum, const int* data);
    myMatrix();
    ~myMatrix();
    void FastTransposeSMatrix(myMatrix& T);
    void printMatrix() const;
};

#endif